#ifndef CVX_EDGE_SHADING_RECOVERY_H
#define CVX_EDGE_SHADING_RECOVERY_H 1

//"Intrinsic Images Using Optimization" cvpr 2011
//assume all pixels are on the edge

#include "cvxImage.h"

class CvxEdgeShadingRecovery
{
public:
	CvxEdgeShadingRecovery();
	~CvxEdgeShadingRecovery();

	void setImage(const Mat &orgImage);
	void calculateWeight(bool isShow);
	void testWeightWithGroundTruth(Mat &albedoGroundTruth);
	void iterativeSolve(int iterNum, float lambda);

private:
	Mat m_orgImage;    // 32 bit float [0 1.0]

	Mat m_yImage;  // Y channel in YUV 32 bit float
	
	Mat m_weightMap; //equation (2)
	Mat m_shadingMap;  // 32 bit float 1.0/shading
	Mat m_albedoMap;

private:
	

};

#endif